<%@page import="java.io.*,
java.util.*,java.util.Date,java.text.DateFormat,java.text.SimpleDateFormat,
java.io.FileReader,
java.io.BufferedReader,
javax.persistence.EntityManager,
javax.persistence.EntityManagerFactory,
javax.persistence.EntityTransaction,
javax.persistence.Persistence,
javax.persistence.Query,
model.User
"%><%
EntityManager em = null; 
	try {

	EntityManagerFactory emf=Persistence.createEntityManagerFactory("todos");
	em=emf.createEntityManager();
	EntityTransaction et = em.getTransaction();
	et.begin();
	
	User user = new User();
	user.setUsername("admin");
	user.setPassword("admin");
	user.setRole("admin");
	user.setFirstname("Muhammad");
	user.setLastname("Ahmad");
	user.setMobileno("+60166150426");
	user.setEmail("manniru@gmail.com");
	//user.setDob("1982-11-07");
	//user.setDatereg("2013-12-05");
	
	em.persist(user);
	et.commit();
	System.out.println("Record Persist!");
	
	
	} catch(Exception e) { System.out.println(e); } finally{ em.close(); }























%>